import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'amfe-flexible'
import request from '@/utlis/request'
import eventBus from '@/eventBus'
import '@/styles/index.scss'
import { getRelativeTime } from '@/utlis/date-time.js'
import {
  Field, CellGroup, Button, NavBar, Toast, Icon, Search, Tabbar, TabbarItem, Tab, Tabs, Cell, Col, Row, Grid, GridItem, Image as VanImage, List, PullRefresh, Lazyload, Popup, ActionSheet, Loading,
  Divider, Tag, Dialog, DatetimePicker, Uploader
} from 'vant'
Vue.use(Uploader)
Vue.use(DatetimePicker)
Vue.use(Dialog)
Vue.use(Tag)
Vue.use(Divider)
Vue.use(Loading)
Vue.use(ActionSheet)
Vue.use(Popup)
Vue.use(Lazyload)
Vue.use(PullRefresh)
Vue.use(List)
Vue.use(VanImage)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(Col)
Vue.use(Row)
Vue.use(Cell)
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(Search)
Vue.use(Icon)
Vue.use(Toast)
Vue.use(Field)
Vue.use(CellGroup)
Vue.use(NavBar)
Vue.use(Button)
Vue.prototype.$request = request
Vue.prototype.$eventBus = eventBus

Vue.config.productionTip = false

Vue.filter('relative', getRelativeTime)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
